import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';

@Component({
    selector: 'app-quality-assurance',
    templateUrl: './quality-assurance.component.html',
    // styleUrls: ['./quality-assurance.component.less'],
})
export class QualityAssuranceComponent implements OnInit {

    // 该组件接收的数据
    // @Input() QualityAssuranceData: any[];
    // 点击该组件后向父组件返回的数据
    // @Output() ReturnQualityAssuranceData: EventEmitter<any> = new EventEmitter<any>();

    qualityAssuranceData: any[]; // 质保书图片数据
    noData = false; // 默认有数据（处于加载中状态）

    constructor() {
    }

    ngOnInit() {
        console.log('质保书 ngOnInit');
        setTimeout(() => {
            // 测试数据
            this.qualityAssuranceData = [
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
                {url: '质保书.png', img: ''},
            ];
        }, 500);
    }


    data(row: Element) {
        return JSON.parse(JSON.stringify(row));
    }

}
